from project_setting import MongoUrl

from spidertools.db_utils.mongdb_utils import get_mongo_connect



_mongo_instance_dict = {}
def get_mongo_instance():
    if 'mongo_instance' not in _mongo_instance_dict:
        _mongo_instance_dict["mongo_instance"] = get_mongo_connect(MongoUrl)

    return _mongo_instance_dict["mongo_instance"]